import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// 引入字体文件
import './assets/font/iconfont.css'

// 引入全局的样式文件
import './assets/css/global.less'

import axios from 'axios'

import SocketService from '@/utils/socket_service';

// 这里调用连接方法，连接websocket
SocketService.Instance.connect();

// this.$socket
Vue.prototype.$socket = SocketService.Instance

// 请求基准路径
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/'

// axios挂载到vue原型上
Vue.prototype.$http = axios

// 将全局的echarts挂载到vue原型上
Vue.prototype.$echarts = window.echarts

// 使用this.echarts
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
